Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global sort: support setting cloud storage uri variable #46407

Merged
merged 18 commits into from
Sep 11, 2023

Conversation

lichunzhu
Copy link
Contributor

@lichunzhu lichunzhu commented Aug 24, 2023

What problem does this PR solve?

Issue Number: ref #45719

Problem Summary:

What is changed and how it works?

support setting global sort uri variable

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
mysql> set @@global.tidb_global_sort_uri="s3://tiflow-test?access-key=testid&secret-access-key=testkey8&endpoint=http://127.0.0.1:5000";
Query OK, 0 rows affected (0.05 sec)
mysql> select @@global.tidb_global_sort_uri;
+-------------------------------+
| @@global.tidb_global_sort_uri |
+-------------------------------+
| s3://tiflow-test/             |
+-------------------------------+
1 row in set (3.69 sec)

Side effects

  • None

Documentation

  • None

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

support setting tidb_global_sort_uri variable

@lichunzhu lichunzhu requested a review from a team as a code owner August 24, 2023 14:34
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 24, 2023
@tiprow
Copy link

tiprow bot commented Aug 24, 2023

Hi @lichunzhu. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #46407 (46f427e) into master (431d30f) will decrease coverage by 0.4975%.
Report is 19 commits behind head on master.
The diff coverage is 100.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #46407        +/-   ##
================================================
- Coverage   73.2928%   72.7954%   -0.4975%     
================================================
  Files          1322       1346        +24     
  Lines        396399     403046      +6647     
================================================
+ Hits         290532     293399      +2867     
- Misses        87336      91069      +3733     
- Partials      18531      18578        +47     
Flag Coverage Δ
integration 27.7906% <44.0000%> (?)
unit 73.4153% <100.0000%> (+0.1225%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 54.0444% <ø> (ø)
parser 84.9717% <ø> (+0.0107%) ⬆️
br 48.4508% <100.0000%> (-4.1552%) ⬇️

@@ -2227,6 +2227,17 @@ var defaultSysVars = []*SysVar{
DDLDiskQuota.Store(TidbOptUint64(val, DefTiDBDDLDiskQuota))
return nil
}},
{Scope: ScopeSession, Name: TiDBGlobalSortURI, Value: "", Type: TypeStr, Validation: func(sv *SessionVars, normalizedValue string, originalValue string, scope ScopeFlag) (string, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only session scope? The usability could be bad because it will be reset to "" every time a new session is created.

}
return normalizedValue, nil
}, GetSession: func(sv *SessionVars) (string, error) {
return sv.GlobalSortURI, nil
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need add mask function to hide ak sk information?

@lichunzhu
Copy link
Contributor Author

@tangenta @Benjamin2037 PTAL again. I add a manual test in PR description

@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 8, 2023
@lichunzhu lichunzhu changed the title global sort: support setting global sort uri variable global sort: support setting cloud storage uri variable Sep 8, 2023
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 8, 2023
@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Sep 8, 2023
Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lichunzhu
Copy link
Contributor Author

/retest

@tiprow
Copy link

tiprow bot commented Sep 8, 2023

@lichunzhu: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tangenta
Copy link
Contributor

tangenta commented Sep 8, 2023

/retest

@tiprow
Copy link

tiprow bot commented Sep 8, 2023

@tangenta: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lichunzhu
Copy link
Contributor Author

/retest

@tiprow
Copy link

tiprow bot commented Sep 8, 2023

@lichunzhu: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@lichunzhu
Copy link
Contributor Author

/ok-to-test

@ti-chi-bot ti-chi-bot bot added the ok-to-test Indicates a PR is ready to be tested. label Sep 8, 2023
@hawkingrei
Copy link
Member

/test all

@lichunzhu
Copy link
Contributor Author

/retest

1 similar comment
@wjhuang2016
Copy link
Member

/retest

@wjhuang2016
Copy link
Member

/test unit-test

@tiprow
Copy link

tiprow bot commented Sep 9, 2023

@wjhuang2016: The specified target(s) for /test were not found.
The following commands are available to trigger required jobs:

  • /test tiprow_fast_test

Use /test all to run all jobs.

In response to this:

/test unit-test

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@wjhuang2016
Copy link
Member

/retest

@lichunzhu
Copy link
Contributor Author

/retest

@lichunzhu
Copy link
Contributor Author

/retest

1 similar comment
@D3Hunter
Copy link
Contributor

/retest

@@ -26,6 +26,7 @@ import (
"time"

"github.com/pingcap/errors"
"github.com/pingcap/tidb/br/pkg/storage"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use the RedactURL in parser/ast/misc.go instead?

@lichunzhu
Copy link
Contributor Author

/retest

2 similar comments
@lichunzhu
Copy link
Contributor Author

/retest

@Benjamin2037
Copy link
Collaborator

/retest

@ti-chi-bot ti-chi-bot bot merged commit cbb7b0a into pingcap:master Sep 11, 2023
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm ok-to-test Indicates a PR is ready to be tested. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants